package com.magic.uschat.util;


import java.util.Comparator;

import com.magic.uschat.Config;
import com.magic.uschat.bean.Friends;


public class PinyinComparator implements Comparator<Friends> {

	public int compare(Friends o1, Friends o2) {
		if (o1.getSortLetter().equals(Config.LETTER_STAR)
				|| o2.getSortLetter().equals("#")) {
			return -1;
		} else if (o1.getSortLetter().equals("#")|| o2.getSortLetter().equals(Config.LETTER_STAR)) {
			return 1;
		} else {
			return o1.getSortLetter().compareTo(o2.getSortLetter());
		}
	}

}
